﻿<Window
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:bme="clr-namespace:BlendModeEffectLibrary;assembly=BlendModeEffectLibrary"
	x:Class="WPFTestHarness.LinearBurnTestWindow"
	Title="Linear Burn Example"
	Height="500"
	Width="700"
>
	<Grid>
		<Grid.ColumnDefinitions>
			<ColumnDefinition Width="*"/>
			<ColumnDefinition Width="*"/>
		</Grid.ColumnDefinitions>
		<StackPanel Grid.Column="0">
			<TextBlock Text="OPACITY OVERLAY" TextWrapping="Wrap" FontFamily="Verdana" FontSize="24" HorizontalAlignment="Center" Foreground="#FF606060"/>
			<Border
				Width="300"
				Height="100"
				Margin="0,10"
				Background="#FF6AB400"
			>
				<TextBlock Text="A" TextWrapping="Wrap" FontFamily="Verdana" FontSize="24" HorizontalAlignment="Center" Foreground="#FF606060" VerticalAlignment="Center"/>
			</Border>
			<TextBlock Text="+" TextWrapping="Wrap" FontFamily="Verdana" FontSize="24" HorizontalAlignment="Center" Foreground="#FF606060"/>
			<Border
				Width="300"
				Height="100"
				Margin="0,10"
			>
				<Border.Background>
					<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
						<GradientStop Color="#FFFFFFFF" Offset="0"/>
						<GradientStop Color="#FF808080" Offset="1"/>
					</LinearGradientBrush>
				</Border.Background>
				<TextBlock Text="B" TextWrapping="Wrap" FontFamily="Verdana" FontSize="24" HorizontalAlignment="Center" Foreground="#FF606060" VerticalAlignment="Center"/>
			</Border>
			<TextBlock Text="=" TextWrapping="Wrap" FontFamily="Verdana" FontSize="24" HorizontalAlignment="Center" Foreground="#FF606060"/>
			<Border
				Grid.Column="0"
				Width="300"
				Height="100"
				Margin="0,10"
				Background="#FF6AB400"
			>
				<Border>
					<Border.Background>
						<LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
							<GradientStop Color="#7FFFFFFF" Offset="0"/>
							<GradientStop Color="#7F808080" Offset="1"/>
						</LinearGradientBrush>
					</Border.Background>
					<TextBlock Text="R" TextWrapping="Wrap" FontFamily="Verdana" FontSize="24" HorizontalAlignment="Center" Foreground="#FF606060" VerticalAlignment="Center"/>
				</Border>
			</Border>
		</StackPanel>
		<StackPanel Grid.Column="1">
			<TextBlock Text="LINEAR BURN" TextWrapping="Wrap" FontFamily="Verdana" FontSize="24" HorizontalAlignment="Center" Foreground="#FF606060"/>
			<Border
				Width="300"
				Height="100"
				Margin="0,10"
				Background="#FF6AB400"
			>
				<TextBlock Text="A" TextWrapping="Wrap" FontFamily="Verdana" FontSize="24" HorizontalAlignment="Center" Foreground="#FF606060" VerticalAlignment="Center"/>
			</Border>
			<TextBlock Text="+" TextWrapping="Wrap" FontFamily="Verdana" FontSize="24" HorizontalAlignment="Center" Foreground="#FF606060"/>
			<Border
				Width="300"
				Height="100"
				Margin="0,10"
			>
				<Border.Background>
					<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
						<GradientStop Color="#FFFFFFFF" Offset="0"/>
						<GradientStop Color="#FF808080" Offset="1"/>
					</LinearGradientBrush>
				</Border.Background>
				<TextBlock Text="B" TextWrapping="Wrap" FontFamily="Verdana" FontSize="24" HorizontalAlignment="Center" Foreground="#FF606060" VerticalAlignment="Center"/>
			</Border>
			<TextBlock Text="=" TextWrapping="Wrap" FontFamily="Verdana" FontSize="24" HorizontalAlignment="Center" Foreground="#FF606060"/>
			<Border
				Width="300"
				Height="100"
				Margin="0,10"
				Background="#FF6AB400"
			>
				<Border.Effect>
					<bme:LinearBurnEffect>
						<bme:LinearBurnEffect.BInput>
							<ImageBrush>
								<ImageBrush.ImageSource>
									<DrawingImage>
										<DrawingImage.Drawing>
											<GeometryDrawing>
												<GeometryDrawing.Geometry>
													<RectangleGeometry Rect="0,0,1,1"/>
												</GeometryDrawing.Geometry>
												<GeometryDrawing.Brush>
													<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
														<GradientStop Color="#FFFFFFFF" Offset="0"/>
														<GradientStop Color="#FF808080" Offset="1"/>
													</LinearGradientBrush>
												</GeometryDrawing.Brush>
											</GeometryDrawing>
										</DrawingImage.Drawing>
									</DrawingImage>
								</ImageBrush.ImageSource>
							</ImageBrush>
						</bme:LinearBurnEffect.BInput>
					</bme:LinearBurnEffect>
				</Border.Effect>
				<TextBlock Text="R" TextWrapping="Wrap" FontFamily="Verdana" FontSize="24" HorizontalAlignment="Center" Foreground="#FF606060" VerticalAlignment="Center"/>
			</Border>
		</StackPanel>
	</Grid>
</Window>
